package view;

import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;


/**
 * Created with IntelliJ IDEA.
 *
 * @Author: SmartBoy
 * @Date: 2021/06/02/16:07
 * @Description:
 */
public class AlertWindow {
    public static void display(Parent root, String title, int width, int height){
        Stage stage = new Stage();

        stage.initModality(Modality.APPLICATION_MODAL);
        Scene scene = new Scene(root,width,height);
        stage.initStyle(StageStyle.TRANSPARENT);
        stage.setTitle(title);
        stage.setScene(scene);
        stage.showAndWait();
    }

}
